<div class="row-fluid">
    <div class="span4">
        <div class="widget">
            <div class="wTitle">
                <h5>Add New Category</h5>
            </div>
            <div class="wContent">
                <div class="formField" id="category_add_new">
                    <div class="row-fluid">
                        <div class="span2">
                            <span class="fLabel" for="name">Name:</span>
                        </div>
                        <div class="span9">
                            <div class="iconField">
                                <input id="name" class="ui-wizard-content" type="text" name="name" placeholder="name">
                                <img alt="" src="<?php echo base_url(); ?>assets/img/icons/14x14/book.png">
                            </div>
                        </div>
                        <div class="span1">
                            <label class="error" for="name" generated="true">(*)</label>
                        </div>
                    </div>	
                    <div class="row-fluid">
                        <div class="span12" align="center">
                            <input id="add_new_cat_submit" class="button sButton bOlive ui-wizard-content ui-formwizard-button" type="button" value="submit">
                        </div>
                    </div>
                    <div class="row-fluid hide" id="err_msg">
                        <div class="span12" align="center">
                            <div class="alert alert-error noMargin">
                            </div>
                        </div>
                    </div>	
                </div>
            </div>
        </div>
    </div>
    <div class="span8">
        <div class="widget">
            <div class="wTitle">
                <h5>List Category</h5>
            </div>
            <div class="wContent">
                <div class="row-fluid">
                    <table cellspacing="0" border="0" class="dTable dataTable" cellpading="0" id="list_all_category">
                        <thead align="left">
                            <tr role="row">
                                <th rowspan="2" >
                                    <i class="icon-book"></i>
                                    Id
                                </th>
                                <th rowspan="2" >
                                    <i class="icon-book"></i>
                                    Name
                                </th>
                                <th rowspan="2" >
                                    Slug
                                </th>
                                <th rowspan="2" align="center" style="width: 50px;">
                                    <i class="icon-tint"></i>
                                    Count
                                </th>
                                <th align="center" colspan="2">
                                    <i class="icon-cog"></i>
                                </th>
                            </tr>
                            <tr>
                                <td></td>
                                <td></td>
                            </tr>
                        </thead>
                        <tbody>
                        <?php foreach ($cats as $cat):?>
                            <tr class="new even" id="catRow_<?= $cat->id ?>" >
                                <td class="catId text-center">
                                    <?= $cat->id ?>
                                </td>
                                <td class="catName">
                                    <?= $cat->name ?>
                                </td>
                                <td class="catSlug">
                                    <?= $cat->slug ?>
                                </td>
                                <td align="right">
                                    <?=$cat->count ?>
                                </td>
                                <td align="center" >
                                    <a rel="tipsyN" onclick="return category.editCategory(<?=$cat->id?>)" href="#" original-title="Edit Category">
                                        <img alt="" src="<?php echo base_url() ?>assets/img/icons/14x14/pen4.png">
                                    </a>
                                </td>
                                <td align="center">
                                    <a href="#" onclick="return category.deleteCategory(<?=$cat->id?>)" id="removeCat_<?= $cat->id ?>" rel="<?= $cat->name ?>" class="removeCat" original-title="Delete Category">
                                        <img alt="" src="<?php echo base_url() ?>assets/img/icons/14x14/trash.png">
                                    </a>
                                </td>
                            </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>